home *** CD-ROM | disk | FTP | other *** search
- /*_ stddef.h Tue May 9 1989 Modified by: Walter Bright */
-
- #ifndef __STDDEF_H
- #define __STDDEF_H 1
-
- #if __cplusplus
- extern "C" {
- #endif
-
- #ifdef __STDC__
- #define __CDECL
- #define __STDCALL
- #else
- #define __CDECL __cdecl
- #define __STDCALL __stdcall
- #endif
-
- #if __OS2__ && __INTSIZE == 4
- #define __CLIB __STDCALL
- #else
- #define __CLIB __CDECL
- #endif
-
- #if _MT
- extern int * __CLIB _errno(void);
- #define errno (*_errno())
-
- #if __INTSIZE == 4
- unsigned long * __CLIB __threadid(void);
- #if __NT__
- #define _threadid (__threadid())
- #else
- /* MOV EAX,FS:[0Ch] */
- #define _threadid ((unsigned long *)__emit__(0x64,0xA1,0x0C,0,0,0))
- #endif
- #else
- extern int __far * __CDECL _threadid;
- #endif
-
- #else
- extern int __CDECL errno;
- #endif
-
- typedef int ptrdiff_t;
- typedef unsigned size_t;
- typedef unsigned short wchar_t;
-
- #define offsetof(t,i) ((size_t)((char *)&((t *)0)->i - (char *)0))
-
- #ifndef NULL
- #if __COMPACT__ || __LARGE__ || __VCM__
- #define NULL 0L
- #else
- #define NULL 0
- #endif
- #endif
-
- #if __cplusplus && !__NEW_H
- extern "C++" {
- inline void *operator new(size_t s, void *at)
- { return at; }
- }
- #endif
-
- #if __cplusplus
- }
- #endif
-
- #endif
-
-
-